package com.itheima.service.impl;

import com.itheima.mapper.AccountMapper;
import com.itheima.pojo.Account;
import com.itheima.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private AccountMapper accountMapper;

    @Override
    public Account findById(Integer id) {
        return accountMapper.selectByPrimaryKey(id);
    }

    @Override
    public void save(Account account) {
        accountMapper.insert(account);
    }
}
